<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="Sort,mx.collections.Sort,ANY_INDEX_MODE,FIRST_INDEX_MODE,LAST_INDEX_MODE,compareFunction,fields,unique,findItem,propertyAffectsSort,reverse,sort" name="keywords">
<title>mx.collections.Sort</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Sort - Zentrum virtUOS: virtPresenter';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">virtPresenter AsDoc</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?mx/collections/Sort.html&amp;mx/collections/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Sort</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Sort"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.collections</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Sort</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Sort <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
  Provides the sorting information required to establish a sort on an
  existing view (ICollectionView interface or class that implements the
  interface). After you assign a Sort instance to the view's
  <code>sort</code> property, you must call the view's
 <code>refresh()</code> method to apply the sort criteria.
   Typically the sort is defined for collections of complex items, that is 
  collections in which the sort is performed on one or more properties of 
  the objects in the collection.
  The following example shows this use:
  <pre><code>
     var col:ICollectionView = new ArrayCollection();
     // In the real world, the collection would have more than one item.
     col.addItem({first:"Anders", last:"Dickerson"});
     // Create the Sort instance.
     var sort:Sort = new Sort();
     // Set the sort field; sort on the last name first, first name second.
     // Both fields are case-insensitive.
     sort.fields = [new SortField("last",true), new SortField("first",true)];
       // Assign the Sort object to the view.
     col.sort = sort;
     // Apply the sort to the collection.
       col.refresh();
  </code></pre>
   <p>There are situations in which the collection contains simple items, like
  <code>String</code>, <code>Date</code>, <code>Boolean</code>, etc.
  In this case, apply the sort to the simple type directly.
  When constructing a sort for simple items, use a single sort field,
  and specify a <code>null</code> <code>name</code> (first) parameter
  in the SortField object constructor.
  For example:
  <pre><code>
     var col:ICollectionView = new ArrayCollection();
     col.addItem("California");
     col.addItem("Arizona");
     var sort:Sort = new Sort();
     // There is only one sort field, so use a <code>null</code> first parameter.
     sort.fields = [new SortField(null, true)];
     col.sort = sort;
       col.refresh();
  </code></pre>
  </p>
   <p>The Flex implementations of the ICollectionView interface retrieve 
  all items from a remote location before executing a sort.
  If you use paging with a sorted list, apply the sort to the remote
  collection before you retrieve the data.
  </p>
   <p></p>
<a name="mxmlSyntaxSummary"></a><span class="classHeaderTableLabel">MXML Syntax</span><span style="display:none" id="showMxmlLink"><a onclick="toggleMXMLOnly();" href="#mxmlSyntaxSummary"><img class="collapsedImage" alt="collapsed" title="collapsed" src="../../images/collapsed.gif"> Show MXML Syntax</a>
<br>
</span><span id="hideMxmlLink"><a onclick="toggleMXMLOnly();" href="#mxmlSyntaxSummary"><img class="expandedImage" alt="expanded" title="expanded" src="../../images/expanded.gif"> Hide MXML Syntax</a></span>
<div class="mxmlSyntax" id="mxmlSyntax"> 
  <p>The <code>&lt;mx:Sort&gt;</code> tag has the following attributes:</p>
   <pre>
  &lt;mx:Sort
  <b>Properties</b>
  compareFunction="<em>Internal compare function</em>"
  fields="null"
  unique="false | true"
  /&gt;
  </pre>
   </div>
<script type="text/javascript" language="javascript">
<!--
setMXMLOnly();
--></script>
<p>
<span class="classHeaderTableLabel">Default MXML Property</span><code>fields</code>
</p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="../collections/ICollectionView.html" target="">mx.collections.ICollectionView</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#compareFunction">compareFunction</a> : Function<div class="summaryTableDescription">
      The method used to compare items when sorting.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#fields">fields</a> : Array<div class="summaryTableDescription">
      An Array of SortField objects that specifies the fields to compare.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#unique">unique</a> : Boolean<div class="summaryTableDescription">
      Indicates if the sort should be unique.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Sort()">Sort</a>()</div>
<div class="summaryTableDescription">
      Constructor.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#findItem()">findItem</a>(items:Array, values:Object, mode:String, returnInsertionIndex:Boolean = false, compareFunction:Function = null):int</div>
<div class="summaryTableDescription">
     Finds the specified object within the specified array (or the insertion
     point if asked for), returning the index if found or -1 if not.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#propertyAffectsSort()">propertyAffectsSort</a>(property:String):Boolean</div>
<div class="summaryTableDescription">
      Return whether the specified property is used to control the sort.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reverse()">reverse</a>():void</div>
<div class="summaryTableDescription">
     Goes through all SortFields and calls reverse() on them.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#sort()">sort</a>(items:Array):void</div>
<div class="summaryTableDescription">
      Apply the current sort to the specified array (not a copy).</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#ANY_INDEX_MODE">ANY_INDEX_MODE</a> : String = "any"<div class="summaryTableDescription">[static]
      When executing a find return the index any matching item.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#FIRST_INDEX_MODE">FIRST_INDEX_MODE</a> : String = "first"<div class="summaryTableDescription">[static]
      When executing a find return the index for the first matching item.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#LAST_INDEX_MODE">LAST_INDEX_MODE</a> : String = "last"<div class="summaryTableDescription">[static]
      When executing a find return the index for the last matching item.</div>
</td><td class="summaryTableOwnerCol">Sort</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="compareFunction"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">compareFunction</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>compareFunction:Function</code>&nbsp;&nbsp;[read-write]<p>
      The method used to compare items when sorting.
      If you specify this property, Flex ignores any <code>compareFunction</code> 
      properties that you specify in the SortField objects that you
      use in this class.
     
      </p><p>The compare function must have the following signature:</p>
     
      <pre><code>
              function [name](a:Object, b:Object, fields:Array = null):int
           </code></pre>
     
      <p>This function must return the following
      <ul>
            <li>-1, if <code>a</code> should appear before <code>b</code> in
            the sorted sequence</li>
            <li>0, if <code>a</code> equals <code>b</code></li>
            <li>1, if <code>a</code> should appear after <code>b</code> in the
            sorted sequence</li>
      </ul></p>
      <p>To return to the internal comparision function set this value to
      <code>null</code>.</p>
     <p>
      The <code>fields</code> array specified specifies the object fields
      to compare.
      Typically the algorithm will compare properties until the field list is
      exhausted or a non zero value can be returned.
      For example:</p>
     
      <pre><code>
        function myCompare(a:Object, b:Object, fields:Array = null):int
        {
            var result:int = 0;
            var i:int = 0;
            var propList:Array = fields ? fields : internalPropList;
            var len:int = propList.length;
            var propName:String;
            while (result == 0 &amp;&amp; (i &lt; len))
            {
                propName = propList[i];
                result = compareValues(a[propName], b[propName]);
                i++;
            }
            return result;
        }
             function compareValues(a:Object, b:Object):int
        {
            if (a == null &amp;&amp; b == null)
                return 0;
                 if (a == null)
              return 1;
                 if (b == null)
               return -1;
                 if (a &lt; b)
                return -1;
                 if (a &gt; b)
                return 1;
                 return 0;
        }
      </code></pre>
           <p>The default value is an internal compare function that can perform 
      a string, numeric, or date comparison in ascending or descending order, 
      with case-sensitive or case-insensitive string comparisons.
      Specify your own function only if you need a need a custom comparison algorithm.
      This is normally only the case if a calculated field is used in a display.</p>
     
      <p>Alternatively you can specify separate compare functions for each sort
      field by using the SortField class <code>compare</code> property;
      This way you can use the default comparison for some fields and a custom
      comparison for others.</p>
     <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get compareFunction():Function</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set compareFunction(value:Function):void</code>
<br>
</div>
<a name="fields"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">fields</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>fields:Array</code>&nbsp;&nbsp;[read-write]<p>
      An Array of SortField objects that specifies the fields to compare.
      The order of the SortField objects in the array determines
      field priority order when sorting.
      The default sort comparator checks the sort fields in array
      order until it determinines a sort order for the two
      fields being compared.
           </p><p>The default value is <code>null</code>.</p>
<p>This property can be used as the source for data binding.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get fields():Array</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set fields(value:Array):void</code>
<br>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="SortField.html" target="">SortField</a>
</div>
</div>
<a name="unique"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">unique</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>unique:Boolean</code>&nbsp;&nbsp;[read-write]<p>
      Indicates if the sort should be unique.
      Unique sorts fail if any value or combined value specified by the
      fields listed in the fields property result in an indeterminate or
      non-unique sort order; that is, if two or more items have identical
      sort field values.
           </p><p>The default value is <code>false</code>.</p>
<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get unique():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set unique(value:Boolean):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Sort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Sort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Sort()</code><p>
      Constructor.
           </p><p>Creates a new Sort with no fields set and no custom comparator.</p>
     </div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="findItem()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">findItem</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function findItem(items:Array, values:Object, mode:String, returnInsertionIndex:Boolean = false, compareFunction:Function = null):int</code><p>
     Finds the specified object within the specified array (or the insertion
     point if asked for), returning the index if found or -1 if not.
     The ListCollectionView class <code>find<i>xxx</i>()</code> methods use 
     this method to find the requested item; as a general rule, it is 
     easier to use these functions, and not <code>findItem()</code> to find 
     data in ListCollectionView-based objects. 
     You call the <code>findItem()</code> method directly when writing a class
     that supports sorting, such as a new ICollectionView implementation.
         </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">items</span>:Array</code> &mdash; the Array within which to search.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">values</span>:Object</code> &mdash; Object containing the properties to look for (or
                   the object to search for, itself).
                   The object must consist of field name/value pairs, where
                   the field names are names of fields specified by the 
                   <code>SortFields</code> property, in the same order they 
                   are used in that property. 
                   You do not have to specify all of the fields from the 
                   <code>SortFields</code> property, but you 
                   cannot skip any in the order. 
                   Therefore, if the <code>SortFields</code>
                   properity lists three fields, you can specify its first
                   and second fields in this parameter, but you cannot specify 
                   only the first and third fields.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">mode</span>:String</code> &mdash; String containing the type of find to perform.
              Valid values are
                    <ul>
                      <li>ANY_INDEX_MODE</li> Return any position that
                      is valid for the values.
                      <li>FIRST_INDEX_MODE</li> Return the position
                      where the first occurrance of the values is found.
                      <li>LAST_INDEX_MODE</li> Return the position
                      where the
                      last ocurrance of the specified values is found.
                    </ul>
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">returnInsertionIndex</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If the method does not find an item identified
                        by the <code>values</code> parameter, and this parameter
                        is <code>true</code> the <code>findItem()</code>
                        method returns the insertion point for the values,
                        that is the point in the sorted order where you should 
                        insert the item.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">compareFunction</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; a comparator function to use to find the item.  If 
                    you do not specify this parameter, the function uses 
                    the function determined by the Sort instance's 
                    <code>compareFunction</code> property, 
                    passing in the array of fields determined
                    by the values object and the current SortFields.
     </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code> &mdash; int The index in the array of the found item.
                   If the <code>returnInsertionIndex</code> parameter is
                 <code>false</code> and the item is not found, returns -1.
                   If the <code>returnInsertionIndex</code> parameter is
                 <code>true</code> and the item is not found, returns
                   the index of the point in the sorted array where the values
                 would be inserted.
    </td>
</tr>
</table>
</div>
<a name="propertyAffectsSort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">propertyAffectsSort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function propertyAffectsSort(property:String):Boolean</code><p>
      Return whether the specified property is used to control the sort.
      The function cannot determine a definitive answer if the sort uses a
      custom comparitor; it always returns <code>true</code> in this case.
           </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">property</span>:String</code> &mdash; The name of the field that to test.
      </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Whether the property value might affect the sort outcome.
      If the sort uses the default compareFunction, returns
      <code>true</code> if the
      <code>property</code> parameter specifies a sort field.
      If the sort or any SortField uses a custom comparator,
     there's no way to know, so return <code>true</code>.
     </td>
</tr>
</table>
</div>
<a name="reverse()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reverse</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reverse():void</code><p>
     Goes through all SortFields and calls reverse() on them.
     If the field was descending now it is ascending, and vice versa.
          </p><p>Note: an ICollectionView does not automatically update when the
     SortFields are modified; call its <code>refresh()</code> method to
     update the view.</p>
     </div>
<a name="sort()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function sort(items:Array):void</code><p>
      Apply the current sort to the specified array (not a copy).
      To prevent the array from being modified, create a copy
      use the copy in the <code>items</code> parameter.
           </p><p>Flex ICollectionView implementations call the <code>sort</code> method
      automatically and ensure that the sort is performed on a copy of the
      underlying data.</p>
           <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">items</span>:Array</code> &mdash; Array of items to sort.
     </td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="ANY_INDEX_MODE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ANY_INDEX_MODE</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const ANY_INDEX_MODE:String = "any"</code><p>
      When executing a find return the index any matching item.
     </p></div>
<a name="FIRST_INDEX_MODE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">FIRST_INDEX_MODE</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const FIRST_INDEX_MODE:String = "first"</code><p>
      When executing a find return the index for the first matching item.
     </p></div>
<a name="LAST_INDEX_MODE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">LAST_INDEX_MODE</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const LAST_INDEX_MODE:String = "last"</code><p>
      When executing a find return the index for the last matching item.
     </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
